//
//  HACRouterPath.h
//  HACRouter
//
//  Created by Chengjie on 2019/5/3.
//

#import <Foundation/Foundation.h>
#import "HACRouterUrlParserRules.h"

NS_ASSUME_NONNULL_BEGIN

@interface HACRouterPath : NSObject

+ (instancetype)routerPathWithUrls:(NSString *)urls whiteHosts:(NSSet<NSString *> *)hosts whiteSchemes:(NSSet<NSString *> *)schemes customParser:(nullable id<HACRouterUrlParserRules>)parser;

/**
 路径对应的 url
 */
@property (nonatomic, strong, readonly) NSURL *url;

/**
 urls,全部为小写格式
 */
@property (nonatomic, copy, readonly) NSString *urls;

/**
 类似 goods/detail, goods/list, 这样的标识
 */
@property (nonatomic, copy, readonly) NSString *pathName;

/**
 urlHost
 */
@property (nonatomic, copy, readonly) NSString *urlHost;

/**
 urlHost
 */
@property (nonatomic, copy, readonly) NSString *urlScheme;

/**
 参数列表
 {
    "name" : "Jack"
    "age"  :  "18"
 }
 */
@property (nonatomic, strong, readonly) NSMutableDictionary<NSString *, NSString *> *parameters;

/**
 类似 goods_detail, goods_list, 这样的标识和pathName唯一区别在于分割符号
 */
@property (nonatomic, copy) NSString *routerName;



#pragma mark -

/**
 匹配出最佳的选择器，用来执行初始化方法

 @param selList 选择器数组
 */
- (void)figureBestInitSelectorAndArgumentsInSelList:(NSArray<NSString *> *)selList;

/**
 最佳初始化方法
 */
@property (nonatomic, copy) NSString *bestInitSelector;

/**
 最佳初始化形参列表
 */
@property (nonatomic, copy) NSArray<NSString *> *bestInitArgs;

@end

NS_ASSUME_NONNULL_END
